home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Apple Macintosh Developer Technical Support
- **
- ** Program: CShell
- ** File: start.c
- ** Originally from: Traffic Light 2.0 (2.0 version by Keith Rollin)
- ** Modified by: Eric Soldan
- **
- ** Copyright © 1989-1991 Apple Computer, Inc.
- ** All rights reserved.
- */
-
-
-
- /*****************************************************************************/
-
-
-
- #include "CShell.h" /* Get the CShell includes/typedefs, etc. */
- #include "CShellCommon.h" /* Get the stuff in common with rez. */
- #include "CShell.protos" /* Get the prototypes for CShell. */
-
-
-
- /*****************************************************************************/
-
-
-
- extern void _DataInit();
-
-
-
- /*****************************************************************************/
- /*****************************************************************************/
-
-
-
- #pragma segment Main
- void main(void)
- {
- #ifndef THINK_C
- UnloadSeg((Ptr)_DataInit); /* Note that _DataInit can't be in Main! */
- #endif
-
- /* If you have stack requirements that differ from the default, then you
- ** could use SetApplLimit to increase StackSpace at this point, before
- ** calling MaxApplZone.
- */
-
- MaxApplZone(); /* Expand the heap so code segments load at the top. */
- Initialize(); /* Initialize the program. */
- StartDocuments(); /* Open (or print) designated documents. */
-
- UnloadSeg((Ptr)Initialize); /* Initialize can't be in Main! */
- EventLoop(); /* Call the main event loop. */
- ExitToShell(); /* Quit the application. */
- }
-
-
-
-